/*
 * GPUC
 * 
 * Copyright © 2008 Attila T. Áfra <attila.afra@gmail.com>
 * 
 * This program is free software: you can redistribute it and/or modify it under the terms of the
 * GNU General Public License as published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
 * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along with this program. If
 * not, see <http://www.gnu.org/licenses/>.
 */

#ifndef _GPUC_COPY_H
#define _GPUC_COPY_H

#include "Common.h"
#include "Buffer.h"
#include "Stream.h"

/*------------------------------------------------------------------------------------------------*/

GPUC_API void
GPUC_copyBufferToMemory(GPUC_Buffer  source,
                        void        *destination);

GPUC_API void
GPUC_partialCopyBufferToMemory(GPUC_Buffer  source,
                               void        *destination,
                               size_t       sourceOffset,
                               size_t       length);

GPUC_API void
GPUC_copyMemoryToBuffer(const void  *source,
                        GPUC_Buffer  destination);

GPUC_API void
GPUC_partialCopyMemoryToBuffer(const void  *source,
                               GPUC_Buffer  destination,
                               size_t       destinationOffset,
                               size_t       length);

GPUC_API void
GPUC_copyStreamToMemory(GPUC_Stream  source,
                        void        *destination);

GPUC_API void
GPUC_partialCopyStreamToMemory(GPUC_Stream           source,
                               void                 *destination,
                               const GPUC_Rectangle *sourceRect);

GPUC_API void
GPUC_copyMemoryToStream(const void  *source,
                        GPUC_Stream  destination);

GPUC_API void
GPUC_partialCopyMemoryToStream(const void           *source,
                               GPUC_Stream           destination,
                               const GPUC_Rectangle *destinationRect);

GPUC_API void
GPUC_copyStreamToBuffer(GPUC_Stream source,
                        GPUC_Buffer destination);

GPUC_API void
GPUC_partialCopyStreamToBuffer(GPUC_Stream           source,
                               GPUC_Buffer           destination,
                               const GPUC_Rectangle *sourceRect,
                               size_t                destinationOffset);

GPUC_API void
GPUC_copyBufferToStream(GPUC_Buffer source,
                        GPUC_Stream destination);

GPUC_API void
GPUC_partialCopyBufferToStream(GPUC_Buffer           source,
                               GPUC_Stream           destination,
                               size_t                sourceOffset,
                               const GPUC_Rectangle *destinationRect);

/*------------------------------------------------------------------------------------------------*/

#endif // _GPUC_COPY
